<?php 
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header2', 'admin');
?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8"/>
<title>Metronic | Form Stuff - Form Layouts</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<!--
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
-->
<link href="<?php echo CSS_PATH?>metronic/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="<?php echo CSS_PATH?>metronic/select2/select2.css"/>
<!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME STYLES -->
<link href="<?php echo CSS_PATH?>metronic/components.css" id="style_components" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/plugins.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/layout.css" rel="stylesheet" type="text/css"/>
<link id="style_color" href="<?php echo CSS_PATH?>metronic/darkblue.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>metronic/custom.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>select_xiala.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo CSS_PATH?>table_form.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?php echo JS_PATH?>calendar/jscal2.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo JS_PATH?>calendar/border-radius.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo JS_PATH?>calendar/win2k.css"/>
<script type="text/javascript" src="<?php echo JS_PATH?>calendar/calendar.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH?>calendar/lang/en.js"></script>
<script src="<?php echo JS_PATH?>PCASClass.js"></script>
<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed page-quick-sidebar-over-content ">
<!-- BEGIN HEADER -->
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div>
			<!-- BEGIN PAGE CONTENT-->
			<div class="row">
				<div class="col-xs-12">
					<div class="tabbable-line boxless tabbable-reversed">
						<div class="tab-content">
							<div class="tab-pane active" id="tab_0">
								<div class="">
									
									<div class="portlet-body form">
										<h><strong>添加医院：</strong></h>
										<!-- BEGIN FORM-->
										<form name="myform" action="?m=admin&c=boneDatabase&a=hospitalinfo_edit" method="post" id="myform" class="form-horizontal">
											<div class="form-body">
												<div class="col-xs-6">
													<div class="form-group">
														<label class="col-xs-12 pullleft">医院名</label>
														<div class="col-xs-12">
															<input type="text" name="hospitalname" id="hospitalname"  class="form-control input-circle" value="<?php echo $data['hospitalname']?>">
														</div>
													</div>
													<div class="form-group">
														<label class="col-xs-12 pullleft">医院号</label>
														<div class="col-xs-12">
															<input type="text" name="hospitalnum" id="hospitalnum"  class="form-control input-circle" value="<?php echo $data['hospitalnum']?>">
														</div>
													</div>

												</div>	
												
											</div>
											<div class="form-actions">
                                                <input type="hidden" name="id" value="<?php echo $data['id']?>"/>
												<div class="row">
													<div class=" col-xs-12">
														 <button name="dosubmit" id="dosubmit" class="btn btn-circle blue" type="submit" style="width: 11%;"><?php echo L('保存资料')?></button>
														 <a class="btn btn-circle blue" href="/boneDatabase/index.php?m=admin&c=boneDatabase&a=hospitalinfoList" style="width: 11%;" >返回</a>
													</div>
												</div>
											</div>
										</form>
										<!-- END FORM-->
									</div>
								</div>
						</div>
					</div>
				</div>
			</div>
			<!-- END PAGE CONTENT-->
		</div>
	</div>
	<!-- END CONTENT -->
</div>
<!-- [if lt IE 9]> -->
<script src="<?php echo CSS_PATH?>metronic/respond.min.js"></script>
<script src="<?php echo CSS_PATH?>metronic/excanvas.min.js"></script> 
<!-- <![endif] -->
<!-- <script type="text/javascript" src="jquery-1.8.0.min.js"></script> -->



<script src="<?php echo CSS_PATH?>metronic/jquery.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery-migrate.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<script src="<?php echo CSS_PATH?>metronic/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery.blockui.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/jquery.cokie.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script type="text/javascript" src="<?php echo CSS_PATH?>metronic/select2/select2.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="<?php echo CSS_PATH?>metronic/metronic.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/layout.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/quick-sidebar.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/demo.js" type="text/javascript"></script>
<script src="<?php echo CSS_PATH?>metronic/form-samples.js"></script>
<script src="<?php echo JS_PATH?>formvalidator.js"></script>
<script src="<?php echo JS_PATH?>formvalidatorregex.js"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
jQuery(document).ready(function() {    
   // initiate layout and plugins
   Metronic.init(); // init metronic core components
Layout.init(); // init current layout
QuickSidebar.init(); // init quick sidebar
Demo.init(); // init demo features
   FormSamples.init();
});
</script>
<script type="text/javascript">
   $(document).ready(function() {
  
	 $.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	//marriage

	 $("#hospitalnum").formValidator({onshow:"<?php echo L('input').L('医院号')?>",onfocus:"<?php echo L('请输入').L('医院号')?>"}).inputValidator({min:3,max:30,onerror:"<?php echo L('医院号').L('3-30字符')?>"}).ajaxValidator({
	     type : "get",
	 	url : "",
	 	data :"m=admin&c=boneDatabase&a=check_hospital_num_ajx&hospital_id=<?php echo $data['id']?>",
	 	datatype : "html",
	 	async:'false',
	 	success : function(data){
             if( data == "1" )
	 		{
                 return true;
	 		}
             else
	 		{
                 return false;
	 		}
	 	},
	 	buttons: $("#dosubmit"),
	 	onerror : "<?php echo L('该医院号已存在')?>",
	 	onwait : "<?php echo L('检查中')?>"

	 });

       $("#hospitalname").formValidator({onshow:"<?php echo L('input').L('医院名称')?>",onfocus:"<?php echo L('请输入').L('医院名称')?>"}).inputValidator({min:3,max:30,onerror:"<?php echo L('医院名称').L('3-30字符')?>"}).ajaxValidator({
           type : "get",
           url : "",
           data :"m=admin&c=boneDatabase&a=check_hospital_name_ajx&hospital_id=<?php echo $data['id']?>",
           datatype : "html",
           async:'false',
           success : function(data){
               if( data == "1" )
               {
                   return true;
               }
               else
               {
                   return false;
               }
           },
           buttons: $("#dosubmit"),
           onerror : "<?php echo L('该医院名称已存在')?>",
           onwait : "<?php echo L('检查中')?>"

       })



   })
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>